package com.yowasa.xiuxian.engine.battle.buff;

import com.yowasa.xiuxian.annoations.Buff;
import com.yowasa.xiuxian.entity.bo.battle.BattleContent;
import com.yowasa.xiuxian.entity.bo.battle.BuffContent;
import com.yowasa.xiuxian.entity.bo.battle.TempUserBattle;
import com.yowasa.xiuxian.entity.bo.battle.UserBattleContent;

import java.math.BigDecimal;


@Buff(name = "雷祸")
public class LeiHuoBuff implements BuffInterface {

    @Override
    public void effectBattleInfo(BuffContent content, TempUserBattle userBattle) {
        int num = Math.min(content.getNum(),5);
        double v = 1 - 0.1 * num;
        userBattle.setRes((int) (userBattle.getRes() * v));
    }


}
